import { Context } from 'egg';

export default function gzip() {
    return async (ctx: Context, next) => {
        let param: any = {};
        if (ctx.req.method === 'GET') {
            param = ctx.query;
        } else if (ctx.req.method === 'POST') {
            param = ctx.request.body;
        }
        if (param) {
            await next();
            return;
        }
    };
};
